const dts = require("rollup-plugin-dts").default
const path = require("path")

export default commandLineArgs => {
  const outPath = commandLineArgs.lib === true ? 'lib' : 'dist';
  return {
    input: path.join(__dirname, 'types', 'lib/index.d.ts'),
    output: {
      file: path.join(__dirname, outPath, 'index.d.ts'),
      format: 'es'
    },
    plugins: [dts()]
  }
};